﻿
namespace DataObject.Cache
{
    public class CacheController
    {
        public static void RemoveCachePort(string action)
        {
            switch (action)
            {
                case Constants.ManagerCacheGroup.News:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.LIST_CACHE_CATEGORY);
                    Channelvn.Cached.CacheController.RemoveAll(Constants.DETAILS_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.User:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.USER_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.Config:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.CONFIG_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.Vote:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.VOTE_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.Photo:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.PHOTO_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.QA:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.QA_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.Data:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.DATA_CACHE_CATEGORY);
                    break;
                case Constants.ManagerCacheGroup.Highlight:
                    Channelvn.Cached.CacheController.RemoveAll(Constants.COMMENT_CACHE_CATEGORY);
                    break;
            }
        }
    }
}
